<?xml version="1.0" encoding="utf-8" ?> 
<taskrunner name="unzip.databases" version="1.1" date="2009-01-09" maxthreads="1">

	<!-- unzips/copies databases from installation source to installation target. -->
	
	<includes>
		<file name="vida.install.settings.xml" />
	</includes> 
	
	

	<tasks>

		<task name="unzip.localdatabases" condition="¤{KeepLocalDb}!=true" typename="@UnZip" retry="3">
      <dependencies list=""/>
      <description>
				Unzips vidalocaldatabase.zip to the installation directory. 
				This task will not be run if current installed version is equal to ${previous.release} or ${release}
			</description>
      <errromessage>
        Couldn't unzip and copy the databases AccessServer and DiagSwdlSession.
      </errromessage>
		
			<parameters>
				<parameter name="filename" value="${install.src.db.dir}\${db.localdatabases.zip.filename}"/>
				<parameter name="outputdirectory" value="${target.db.dir}"/>
				<parameter name="overwrite" value="true"/>
			</parameters>
		</task>
		
		<task name="unzip.servicerepository" typename="@UnZip" retry="3">
			<description>
				Unzips servicerepository database. This step is not applicable if we're doing an language-add installation.
			</description>
      
      <errromessage>
        Couldn't unzip and copy the database ServiceRepository
      </errromessage>
      
			<parameters>
				<parameter name="filename" value="${install.src.language.db.dir}\servicerep_${vida.language}.zip"/>
				<parameter name="outputdirectory" value="${target.db.dir}"/>
				<parameter name="overwrite" value="true"/>
			</parameters>
		</task>
		
		<task name="unzip.basedata" typename="@UnZip" retry="3">
			<description>
				Unzips servicerepository database. This step is not applicable if we're doing an language-add installation.
			</description>
      <errromessage>
        Couldn't unzip and copy the database BaseData.
      </errromessage>
		
			<parameters>
				<parameter name="filename" value="${install.src.db.dir}\${db.basedata.zip.filename}"/>
				<parameter name="outputdirectory" value="${target.db.dir}"/>
				<parameter name="overwrite" value="true"/>
			</parameters>
		</task>
		
		<task name="unzip.epc" typename="@UnZip" retry="3">
			<description>
				Unzips servicerepository database. This step is not applicable if we're doing an language-add installation.
			</description>
      <errromessage>
        Couldn't unzip and copy the database BaseData.
      </errromessage>


      <parameters>
				<parameter name="filename" value="${install.src.db.dir}\${db.epc.zip.filename}"/>
				<parameter name="outputdirectory" value="${target.db.dir}"/>
				<parameter name="overwrite" value="true"/>
			</parameters>
		</task>
		
		<task name="unzip.diagswdlrepository" typename="@UnZip" retry="3">
			<description>
				Unzips servicerepository database. This step is not applicable if we're doing an language-add installation.
			</description>
      <errromessage>
        Couldn't unzip and copy the database DiagSwdlRepository
      </errromessage>
		
			<parameters>
				<parameter name="filename" value="${install.src.db.dir}\${db.diagswdlrepository.zip.filename}"/>
				<parameter name="outputdirectory" value="${target.db.dir}"/>
				<parameter name="overwrite" value="true"/>
			</parameters>
		</task>
		
		<task name="unzip.carcomrt" typename="@UnZip" retry="3">
			<description>
				Unzips servicerepository database. This step is not applicable if we're doing an language-add installation.
			</description>
      <errromessage>
        Couldn't unzip and copy the database CarComRT
      </errromessage>
		
			<parameters>
				<parameter name="filename" value="${install.src.db.dir}\${db.carcomrt.zip.filename}"/>
				<parameter name="outputdirectory" value="${target.db.dir}"/>
				<parameter name="overwrite" value="true"/>
			</parameters>
		</task>

    <task name="unzip.dicetiming" typename="@UnZip" retry="3">
      <description>
        Unzips servicerepository database. This step is not applicable if we're doing an language-add installation.
      </description>
      <errromessage>
        Couldn't unzip and copy the database DiceTiming.
      </errromessage>

      <parameters>
        <parameter name="filename" value="${install.src.db.dir}\${db.dicetiming.zip.filename}"/>
        <parameter name="outputdirectory" value="${target.db.dir}"/>
        <parameter name="overwrite" value="true"/>
      </parameters>
    </task>
		
    
		<task name="copy.imagerepository.mdf" condition="¤{install.type}=INSTALL" typename="@FileCopy" retry="3">
			<description>
				Copies imagerepositorty. No eUpdate will affect imagerepository so we do not need to
        reinstall this database when installing a new language.
			</description>
      <errromessage>
        Couldn't copy the database ImageRepository (file ${db.imagerepository.data.filename})
      </errromessage>

			<parameters>
				<parameter name="src" value="${install.src.db.dir}\${db.imagerepository.data.filename}"/>
				<parameter name="dst" value="${target.db.dir}\${db.imagerepository.data.filename}"/>
			</parameters>
		</task>

    <task name="copy.imagerepository.ldf" condition="¤{install.type}=INSTALL" typename="@FileCopy" retry="3">
      <description>
        Copies imagerepositorty. No eUpdate will affect imagerepository so we do not need to
        reinstall this database when installing a new language.
      </description>
      <errromessage>
        Couldn't copy the database ImageRepository (file ${db.imagerepository.log.filename})
      </errromessage>


      <parameters>
        <parameter name="src" value="${install.src.db.dir}\${db.imagerepository.log.filename}"/>
        <parameter name="dst" value="${target.db.dir}\${db.imagerepository.log.filename}"/>
      </parameters>
    </task>
    
    
    
	</tasks>
  
	
</taskrunner>
